import axios from 'axios';
import uitl from '../common/js/util';
let base = 'enjoylove';
let axios_config={responseType: 'json'};



/*****************************************************辅导管理*************************/

export const  getInstructorList = params =>{             //获取辅导列表
    return axios.post(`${base}/instructor/list`, params);
}
export const  addInstructor = params =>{                //添加辅导
    return axios.post(`${base}/instructor/add`, params);
}
export const  updateInstructor = params =>{             //更新辅导信息
    return axios.post(`${base}/instructor/update`, params);
}
export const  getInstructorAreas = params =>{             // 获取区域信息
    return axios.post(`${base}/instructor/areas`, params);
}
/*****************************************************客户管理*************************/

export const  getCustomerList = params =>{              //获取客户信息列表
    return axios.post(`${base}/customer/list`, params);

}


/*****************************************************商品管理*************************/

export const  getProductList = params =>{               //获取商品信息列表
    return axios.post(`${base}/product/list`, params);

}
export const  uploadProduct = params =>{                //商品上传
    return axios.post(`${base}/product/uploadProduct`, params);

}
export const  deleteProductPicture = params =>{         //删除商品图片
    return axios.post(`${base}/product/deleteProductPicture`, params);

}
export const  deleteProductCategory = params =>{       //商品删除分类
    return axios.post(`${base}/product/deleteProductCategory`, params);

}
export const  addProductCategory = params =>{           //添加商品分类
    return axios.post(`${base}/product/addProductCategory`, params);

}
export const  productCategoryList = params =>{          //指定分类商品列表
    return axios.post(`${base}/product/productCategoryList`, params);

}
export const  productAnyCategoryList = params =>{       //没有分类商品列表
    return axios.post(`${base}/product/productAnyCategoryList`, params);

}
export const  addProductPicture = params =>{            //添加商品图片
    return axios.post(`${base}/product/addProductPicture`, params);

}
export const  editProduct = params =>{                  //编辑商品
    return axios.post(`${base}/product/editProduct`, params);

}
export const  editProductUnit = params =>{                  //编辑商品单位
    return axios.post(`${base}/product/editProductUnit`, params);

}
export const  getProduct = params =>{                  //商品详情
    return axios.post(`${base}/product/getProduct`, params);

}

/*****************************************************分类管理*************************/

export const  getCategoryList = params =>{              //获取分类管理列表
    return axios.post(`${base}/category/list`, params);

}
export const  addCategory = params =>{                  //新增分类管理
    return axios.post(`${base}/category/addCategory`, params);

}
export const  updateCategory = params =>{               //修改分类管理
    return axios.post(`${base}/category/updateCategory`, params);

}

/*****************************************************订单管理*************************/

export const  getOrderList = params =>{                 //获取订单列表
    return axios.post(`${base}/order/list`, params);

}
export const   getOrderStatusList = params =>{                 //获取订单状态列表
    return axios.post(`${base}/order/OrderStatuslist`, params);

}
export  const  getOrderDetailByID = params =>{              //获取订单详情
    return axios.post(`${base}/order/OrderDetail`, params)
}
export  const  confirmOrder = params =>{              //确认订单
    return axios.post(`${base}/order/confirmOrder`, params, {
        headers: {'Content-Type': 'multipart/form-data'}
    })
}
export  const  uploadOrderPic = params =>{              //确认订单
    return axios.post(`${base}/order/uploadOrderPic`, params,)
}